const environment = process.env.ENVIRONMENT || "dev";

let gameServerPassword = "123456";
let readonlyPassword = "123456";

if (environment === "production") {
  gameServerPassword = "Uqip8BVwrk9Eget4fDVq1";
  readonlyPassword = "Uqip8BVwrk9Eget4fDVq2";
}


db = db.getSiblingDB("admin");

db.runCommand({
  createUser: "gameServer",
  pwd: gameServerPassword,
  roles: [
    { role: "dbOwner", db: "db_5ss_acc" }
  ]
});



db.runCommand({
  createUser: "readonly",
  pwd: readonlyPassword,
  roles: [
    { role: "findOnlyRole", db: "admin" }
  ]
});
